package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysBannerItemMapper;
import com.ruoyi.system.domain.SysBannerItem;
import com.ruoyi.system.service.ISysBannerItemService;

/**
 * 活动内容明细Service业务层处理
 * 
 * @author wolong
 * @date 2023-03-13
 */
@Service
public class SysBannerItemServiceImpl implements ISysBannerItemService 
{
    @Autowired
    private SysBannerItemMapper sysBannerItemMapper;

    /**
     * 查询活动内容明细
     * 
     * @param bannerItemId 活动内容明细主键
     * @return 活动内容明细
     */
    @Override
    public SysBannerItem selectSysBannerItemByBannerItemId(Long bannerItemId)
    {
        return sysBannerItemMapper.selectSysBannerItemByBannerItemId(bannerItemId);
    }

    /**
     * 查询活动内容明细列表
     * 
     * @param sysBannerItem 活动内容明细
     * @return 活动内容明细
     */
    @Override
    public List<SysBannerItem> selectSysBannerItemList(SysBannerItem sysBannerItem)
    {
        return sysBannerItemMapper.selectSysBannerItemList(sysBannerItem);
    }

    /**
     * 新增活动内容明细
     * 
     * @param sysBannerItem 活动内容明细
     * @return 结果
     */
    @Override
    public int insertSysBannerItem(SysBannerItem sysBannerItem)
    {
        sysBannerItem.setCreateTime(DateUtils.getNowDate());
        return sysBannerItemMapper.insertSysBannerItem(sysBannerItem);
    }

    /**
     * 修改活动内容明细
     * 
     * @param sysBannerItem 活动内容明细
     * @return 结果
     */
    @Override
    public int updateSysBannerItem(SysBannerItem sysBannerItem)
    {
        sysBannerItem.setUpdateTime(DateUtils.getNowDate());
        return sysBannerItemMapper.updateSysBannerItem(sysBannerItem);
    }

    /**
     * 批量删除活动内容明细
     * 
     * @param bannerItemIds 需要删除的活动内容明细主键
     * @return 结果
     */
    @Override
    public int deleteSysBannerItemByBannerItemIds(Long[] bannerItemIds)
    {
        return sysBannerItemMapper.deleteSysBannerItemByBannerItemIds(bannerItemIds);
    }

    /**
     * 删除活动内容明细信息
     * 
     * @param bannerItemId 活动内容明细主键
     * @return 结果
     */
    @Override
    public int deleteSysBannerItemByBannerItemId(Long bannerItemId)
    {
        return sysBannerItemMapper.deleteSysBannerItemByBannerItemId(bannerItemId);
    }
}
